cap log close
log using "${logpath}describe_enforcement.log", replace

/*******************************************************************************
describe_enforcement.do

This code reports the number of and payments to sued firms
*******************************************************************************/

use "${cleandatapath}ambulancetaxis_firmpanel_enforcement.dta", clear

qui keep if !mi(firmenforcementtype_civil)

gen firmenforcementmonth = mofd(firmenforcementdate)

bysort npi: gen uniquefirm = _n == 1 

collapse (sum) linepmt uniquefirm

gen pmt_per=(linepmt/0.2)/uniquefirm

list // Referenced in Section 6.3, Paragraph 1 and Appendix J.2, Bullet 5

log close